package com.hnkywl.sts.entity.zjgl;

import com.hnkywl.sts.entity.BaseEntity;
import com.hnkywl.sts.entity.base.Sjzdz;
import com.hnkywl.sts.entity.cggl.Jsd;
import com.hnkywl.sts.entity.htgl.Cght;
import com.hnkywl.sts.entity.organ.Gsjg;
import com.hnkywl.sts.entity.sfgl.Sfk;
import org.hibernate.annotations.NotFound;
import org.hibernate.annotations.NotFoundAction;
import org.hibernate.annotations.Where;

import javax.persistence.*;
import java.util.Date;

/**
 * Created by HL on 2016/4/13.
 */
@Entity
@Table(name = "T_BIZ_JZJS")
@Where(clause = "deleted!='1'")
public class Jzjs extends BaseEntity {
    @Id
    @SequenceGenerator(name = "seqJzjs", allocationSize = 1, sequenceName = "SEQ_BIZ_JZJS")
    @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "seqJzjs")
    private Long id;

    /**
     * 公司名称
     */
    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "NBGS_ID")
    @NotFound(action = NotFoundAction.IGNORE)
    private Gsjg nbgs;

    /**
     * 采购合同
     */
    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "HT_ID")
    @NotFound(action = NotFoundAction.IGNORE)
    private Cght cght;


    /**
     * 结算单
     */
    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "JSD_ID")
    @NotFound(action = NotFoundAction.IGNORE)
    private Jsd jsd;

    /**
     * 金额
     */
    private Double je;

    /**
     * 余额
     */
    private Double ye;


    /**
     * 客户
     */
    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "KH_ID")
    @NotFound(action = NotFoundAction.IGNORE)
    private Gsjg kh;

    /**
     * 收款
     */
    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "SK_ID")
    @NotFound(action = NotFoundAction.IGNORE)
    private Sfk sk;

    /**
     * 款项使用
     */
    @ManyToOne
    @JoinColumn(name = "KXSY_SJZDZ_ID")
    @NotFound(action = NotFoundAction.IGNORE)
    private Sjzdz kxsy;

    /**
     * 付款方式  0 现汇  1承兑
     */
    @ManyToOne
    @JoinColumn(name = "FKFS_SJZDZ_ID")
    @NotFound(action = NotFoundAction.IGNORE)
    private Sjzdz fkfs;

    // 承兑到期时间
    private Date endDate;

    //开具保证金type 0 现金 1 承兑
    private String fklx;

    //客户付款时间
    private Date khfksj;

    // 计算天数
    private Long jsts;

    //免息天数
    private Integer mxts;

    //贴息率
    private Double txl;

    //贴息金额
    private Double tx;

    // 贴息余额
    private Double txye;

    // 使用情况，0：已锁定，1：已解锁 2:已保存
    private String zt;


    //======================\

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Gsjg getNbgs() {
        return nbgs;
    }

    public void setNbgs(Gsjg nbgs) {
        this.nbgs = nbgs;
    }

    public Cght getCght() {
        return cght;
    }

    public void setCght(Cght cght) {
        this.cght = cght;
    }

    public Jsd getJsd() {
        return jsd;
    }

    public void setJsd(Jsd jsd) {
        this.jsd = jsd;
    }

    public Double getJe() {
        return je;
    }

    public void setJe(Double je) {
        this.je = je;
    }

    public Double getYe() {
        return ye;
    }

    public void setYe(Double ye) {
        this.ye = ye;
    }

    public Gsjg getKh() {
        return kh;
    }

    public void setKh(Gsjg kh) {
        this.kh = kh;
    }

    public Sfk getSk() {
        return sk;
    }

    public void setSk(Sfk sk) {
        this.sk = sk;
    }

    public Sjzdz getKxsy() {
        return kxsy;
    }

    public void setKxsy(Sjzdz kxsy) {
        this.kxsy = kxsy;
    }

    public Sjzdz getFkfs() {
        return fkfs;
    }

    public void setFkfs(Sjzdz fkfs) {
        this.fkfs = fkfs;
    }

    public Date getEndDate() {
        return endDate;
    }

    public void setEndDate(Date endDate) {
        this.endDate = endDate;
    }

    public String getFklx() {
        return fklx;
    }

    public void setFklx(String fklx) {
        this.fklx = fklx;
    }

    public Date getKhfksj() {
        return khfksj;
    }

    public void setKhfksj(Date khfksj) {
        this.khfksj = khfksj;
    }

    public Long getJsts() {
        return jsts;
    }

    public void setJsts(Long jsts) {
        this.jsts = jsts;
    }

    public Integer getMxts() {
        return mxts;
    }

    public void setMxts(Integer mxts) {
        this.mxts = mxts;
    }

    public Double getTxl() {
        return txl;
    }

    public void setTxl(Double txl) {
        this.txl = txl;
    }

    public Double getTx() {
        return tx;
    }

    public void setTx(Double tx) {
        this.tx = tx;
    }

    public Double getTxye() {
        return txye;
    }

    public void setTxye(Double txye) {
        this.txye = txye;
    }

    public String getZt() {
        return zt;
    }

    public void setZt(String zt) {
        this.zt = zt;
    }
}
